package com.yiyue.graduate.pojo;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

/**
 * @author yiyuexiaofusheng
 * @date 2021/1/18
 */
public class Course implements Serializable {

    private Long id;
    //冗余字段（老师名字）
    private String username;
    //标题
    private String title;
    //内容
    private String content;
    //价格
    private Double price;
    //课程图片
    private String picture;
    //上传时间
    private Date createTime;
    //课程类型
    private String courseType;
    //课程类别
    private String courseCategory;
    //课程分类
    private String courseSort;
//    著作者(id)
    @TableField("user_id")
    private User user;


    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Course() {
    }

    @Override
    public String toString() {
        return "Course{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", price=" + price +
                ", picture='" + picture + '\'' +
                ", createTime=" + createTime +
                ", courseType='" + courseType + '\'' +
                ", courseCategory='" + courseCategory + '\'' +
                ", courseSort='" + courseSort + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public String getCourseCategory() {
        return courseCategory;
    }

    public void setCourseCategory(String courseCategory) {
        this.courseCategory = courseCategory;
    }

    public String getCourseSort() {
        return courseSort;
    }

    public void setCourseSort(String courseSort) {
        this.courseSort = courseSort;
    }

    public Course(Long id, String username, String title, String content, Double price, String picture, Date createTime, String courseType, String courseCategory, String courseSort) {
        this.id = id;
        this.username = username;
        this.title = title;
        this.content = content;
        this.price = price;
        this.picture = picture;
        this.createTime = createTime;
        this.courseType = courseType;
        this.courseCategory = courseCategory;
        this.courseSort = courseSort;
    }
}
